<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%@ page isELIgnored="false" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
        <title><c:out value="${pageTitle }">${_blogTitle }</c:out></title>
        <meta name="keywords" content="${_keyword }" />
        <meta name="description" content="${_description }" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link href="/static/css/base.css" rel="stylesheet" />
		<link href="/static/css/index.css" rel="stylesheet" />
		<link href="/static/css/m.css" rel="stylesheet" />
		<script src="/static/plugin/jquery.min.js"></script>
		<link rel="icon" href="/static/img/logo.ico" type="image/x-icon" />

<!--[if lt IE 9]>
<script src="js/modernizr.js"></script>
<![endif]-->
	</head>
	
	<body>

	<jsp:include page="common/top.jsp" />

<article>
  	<h1 class="t_nav"><span>Talk is Cheap, Show me the Code! </span><a href="home" class="n1">&lt;&lt;网站首页</a><a href="list" class="n2">文章列表</a></h1>
  	<div class="blogs" style=" margin-top: 10px" >
        <div class="blogs-1">
	    <c:choose>
			<c:when test="${ not empty articles.list }">  
			     
			    <c:if test="${not empty articles.recommend and articles.recommend == 1 }">
			     <div style="background-color : white; margin-bottom : -15px; padding : 10px;">
                    <div style="padding : 5px; font-size : 16px; background-color : rgb(246, 201, 88, 0.4); 
                     z-index : 111; width : 90%; margin : 5px auto; color : #777777; text-align : center; line-height : 32px;
                     border-radius : 6px;">
                     没有符合条件的文章，为您推荐如下内容
                    </div>
			     </div>
			    </c:if>
			
				<c:forEach var="article" items="${ requestScope.articles.list }" varStatus="status" >
			    <li> 
			    
                    <h3 class="blogtitle"><a class="hvr-wobble-skew" href="articledetail?atclid=${article.id}" target="_blank">${article.title }</a></h3>
                    
                    <c:if test="${not empty article.thumbnailImgUrl }">
                    <span class="blogpic">
                        <a href="articledetail?atclid=${article.id}" target="_blank">
                            <img src="<c:out value="${article.thumbnailImgUrl }">https://oomabc.com/staticsrc/img/201809/25/1537852410029_eda9dd1328e64bb8afa0b97a3c2c6c91.jpg</c:out>_260X150">
                        </a>
                    </span>
                    </c:if>
                    <div class="bloginfo">
                        <a href="articledetail?atclid=${article.id}" target="_blank">
                            <p>${article.content }</p>
                        </a>
                    </div>
                    
			      	<div class="autor">
			      		<c:if test="${not empty article.tags }">
			      		<span class="lm">
			      			<c:forEach var="tag" items="${article.tags }" varStatus="status">
			      			<a class="hvr-buzz-out" href="list?tag=${tag }" target="_blank" class="classname">${tag }</a>&nbsp;&nbsp;
			      			</c:forEach>
			      		</span>
			      		</c:if>
			      		<span class="dtime">${article.updateTimeString }</span>
			      		<span class="viewnum">浏览（${article.viewCount }）</span>
			      		<span class="readmore"><a class="hvr-wobble-horizontal" href="articledetail?atclid=${article.id}" target="_blank">阅读原文>></a></span>
			      	</div>
			    </li>
				</c:forEach>     
		   	</c:when>
		   	<c:otherwise> 
				<div style="margin : 0px 10px; padding : 40px 30px 40px 30px; ">
					<div>暂时没有符合该条件的文章！返回<a href="list" style="text-decoration : underline; ">全部列表</a></div>
				</div>
		   	</c:otherwise>
		</c:choose>
		</div>
		
		<!-- 分页 -->
		<c:if test="${not empty articles.pages }">
    	<div class="pagelist">

    		<c:forEach var="pageModel" items="${ articles.pages }" varStatus="status" >
			    <c:choose>
					<c:when test="${ pageModel.link }">  
	    				<a href="javascript:void(0);" onclick="jumpPage(${pageModel.pageNo});">${ pageModel.pageDesc }</a>&nbsp;
					</c:when>
					<c:otherwise>
	    				<b>${ pageModel.pageDesc }</b>&nbsp;
					</c:otherwise>
				</c:choose>
    		</c:forEach>
    	</div>
		</c:if>
		
	</div>
  	<div class="sidebar" style="padding-top : 13px;">
	    <!-- 关键字 -->
		<jsp:include page="common/search_input.jsp" />
	    
	    <!-- 栏目导航 -->
		<jsp:include page="common/navigator_right.jsp" />

	   	<!-- 点击排行 -->
		<jsp:include page="common/click_rank.jsp" />
	   
	 	<!-- 标签 -->
		<jsp:include page="common/tags_rank.jsp" />
		
		<!-- 站长推荐 -->    
		<jsp:include page="common/priority_rank.jsp" />


  	</div>
</article>

	<div class="blank"></div>
	<jsp:include page="common/bottom.jsp" />
</body>
</html>